
# 判断id
aaa=0
while (aaa == 0):
    ids = input("请输入ID，由【数字、字母、下划线】组成且不超过8位：")
    if (len(ids) > 8):
        print("id太长了")
    for id in ids:
        if id.isdigit() or id.isalpha() or id == "_":
            aaa = 1
        else:
            print("包含非法字符，请重新输入")
            aaa = 0
            break

# 判断邮箱
bbb=0
while(bbb==0):
    email = input("请输入邮箱：")
    email_split = email.split('@', 1)
    if (5 <= len(email_split[0]) <= 11):
        if (email_split[1] != 'qq.com') and (email_split[1] != '163.com') and (email_split[1] != '139.com') and (
                email_split[1] != 'sina.com') and (email_split[1] != 'yahoo.com') and (email_split[1] != 'souhu.com'):
            bbb=0
        else:
            bbb=1

# 判断身份证号
ccc=0
while(ccc==0):
    idNum=input("请输入身份证号：")
    if len(idNum)==13:
        ccc=1


# 判断姓名
ddd=0
while(ddd==0):
    names=input("请输入姓名：")
    ddd=1
    # for name in names:
        # if len(name)==1:
            # print(name)

print("ID：",ids)
print("邮箱：",email)
print("身份证号：",idNum)
print("姓名：",names)
